package ch.janotta.slawo.ultraquest.generators;

import ch.janotta.slawo.ultraquest.rulesets.areas.AreaRuleset;
import ch.janotta.slawo.ultraquest.rulesets.areas.AreaRulesetsFactory;
import ch.janotta.slawo.ultraquest.types.Area;
import ch.janotta.slawo.ultraquest.types.AreaData;

public class AreaGenerator {
  public AreaData generate(Area areaDefinition) {
    AreaRuleset ruleset = AreaRulesetsFactory.getRulesetInstance(areaDefinition);
    AreaData area = new AreaData();
    area.setName(ruleset.getName());
    area.setDescription("A " + ruleset.getName() + " area.");
    area.setDungeon(ruleset.getDungeonSetting());
    area.setDifficulty(ruleset.getDifficulty());
    area.setNeighbors(ruleset.getNeighbors());
    return area;
  }
}
